package com.surenpi.jenkins.client.queue;

import com.surenpi.jenkins.client.BaseManager;
import java.io.IOException;

public class Queues extends BaseManager {
   protected String[] getDependencyArray() {
      return null;
   }

   public Queue getItems() throws IOException {
      return (Queue)this.getClient().get("/queue/api/json", Queue.class);
   }

   public QueueItemDetail getItem(int id) throws IOException {
      return (QueueItemDetail)this.getClient().get("/queue/item/" + id + "/api/json", QueueItemDetail.class);
   }

   public void cancelItem(int id) throws IOException {
      this.getClient().post("/queue/cancelItem?id=" + id, this.isCrumb());
   }
}
